package itheima.d11;

import java.util.StringJoiner;

public class Test {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6,7,8,9,10};
        System.out.println(getArrayData(arr));

    }

    public static String getArrayData(int[] arr) {
        StringJoiner sb = new StringJoiner(",","[","]");
        for (int i = 0; i < arr.length; i++) {
            sb.add(arr[i] + "");
        }

return sb.toString();
    }


}
